package com.provider.controller;

import com.pojo.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @GetMapping("/test/provider/{name}")
    public String test(@PathVariable String name){
        return "test："+name;
    }

    @GetMapping("/getUser")
    public User getUser(User user){
        return User.builder().id(1).name(user.getName()).email(user.getEmail()).build();
    }
}
